package collectionDemo;

import utils.PrintUtil;

import java.util.Arrays;

/**
 * @author Ajie
 * @date 3/25/22
 * @function
 */
public class ArraysCopyDemo {
    private static int[] dest;

    public static void main(String[] args) {

        int[] origin = {1,3,5,7,9};

        Arrays.sort(origin);
        dest = new int[origin.length];
        System.arraycopy(origin,0,dest,0,origin.length);

        PrintUtil.print(dest);
    }
}
